<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('用户')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="username" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('房东')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-homeowner_id" data-rule="required" data-source="user/user/index" class="form-control selectpage" data-field="username" name="row[homeowner_id]" type="text" value="{$row.homeowner_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Homeowner_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-homeowner_name" class="form-control" name="row[homeowner_name]" type="text" value="{$row.homeowner_name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Homeowner_idcard')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-homeowner_idcard" class="form-control" name="row[homeowner_idcard]" type="text" value="{$row.homeowner_idcard|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Homeowner_phone')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-homeowner_phone" class="form-control" name="row[homeowner_phone]" type="text" value="{$row.homeowner_phone|htmlentities}">
        </div>
    </div>
    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-type" class="form-control" name="row[type]" type="number" value="{$row.type|htmlentities}">
        </div>
    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('House_address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-house_address" class="form-control" name="row[house_address]" type="text" value="{$row.house_address|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_time]" type="text" value="{:$row.start_time?datetime($row.start_time):''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_time]" type="text" value="{:$row.end_time?datetime($row.end_time):''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Money_zu')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-money_zu" class="form-control" step="0.01" name="row[money_zu]" type="number" value="{$row.money_zu|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Money_ya')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-money_ya" class="form-control" step="0.01" name="row[money_ya]" type="number" value="{$row.money_ya|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Pay_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-pay_time" class="form-control"  name="row[pay_time]" type="number" value="{$row.pay_time|htmlentities}">

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Money_electricity')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-money_electricity" class="form-control" step="0.01" name="row[money_electricity]" type="number" value="{$row.money_electricity|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Money_water')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-money_water" class="form-control" step="0.01" name="row[money_water]" type="number" value="{$row.money_water|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Attachment')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-attachment" class="form-control" size="50" name="row[attachment]" type="text" value="{$row.attachment|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-attachment" class="btn btn-danger faupload" data-input-id="c-attachment" data-multiple="false" data-preview-id="p-attachment"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-attachment" class="btn btn-primary fachoose" data-input-id="c-attachment" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-attachment"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-attachment"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Photo')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-photo" class="form-control" size="50" name="row[photo]" type="textarea" value="{$row.photo|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-photo" class="btn btn-danger faupload" data-input-id="c-photo" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-photo"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-photo" class="btn btn-primary fachoose" data-input-id="c-photo" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-photo"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-photo"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('房源')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-house_id" data-rule="required" data-source="house/house/index" class="form-control selectpage" name="row[house_id]" data-field="name" type="text" value="{$row.house_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('房间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-room_id" data-rule="required" data-source="building/room/index" class="form-control selectpage" name="row[room_id]" type="text" value="{$row.room_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Water_num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-water_num" data-rule="required" class="form-control" name="row[water_num]" type="number" value="{$row.water_num|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Electricity_num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-electricity_num" data-rule="required" class="form-control" name="row[electricity_num]" type="number" value="{$row.electricity_num|htmlentities}">
        </div>
    </div>
    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Ya_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-ya_type" data-rule="required" class="form-control" name="row[ya_type]" type="number" value="{$row.ya_type|htmlentities}">
        </div>
    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Ya_type')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="ya_typeList" item="vo"}
                <label for="row[ya_type]-{$key}"><input id="row[ya_type]-{$key}" name="row[ya_type]" type="radio" value="{$key}" {in name="key" value="$row.ya_type"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('楼栋')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-build_id" data-rule="required" data-source="building/building/index" class="form-control selectpage" name="row[build_id]" type="text" data-field="address" value="{$row.build_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Build_address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-build_address" class="form-control" name="row[build_address]" type="text" value="{$row.build_address|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Room_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-room_name" class="form-control" name="row[room_name]" type="text" value="{$row.room_name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('用户姓名')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_name" class="form-control" name="row[user_name]" type="text" value="{$row.user_name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('用户手机号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_phone" class="form-control" name="row[user_phone]" type="text" value="{$row.user_phone|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('用户身份证号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_card" class="form-control" name="row[user_card]" type="text" value="{$row.user_card|htmlentities}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
